As _updateCount has been designed to be overwritable by subclasses,
move the check for _actorDestroyed into _setCount(), to fix the
problem described in commit
5f6ac33d5 in derived types as well.
if (isNaN(parseInt(count)))
throw new Error("Invalid notification count: " + count);
+ if (this._actorDestroyed)
+ return;
+
this._counterBin.visible = visible;
this._counterLabel.set_text(count.toString());
},
_updateCount: function() {
- if (this._actorDestroyed)
- return;
-
let count = this.notifications.length;
this._setCount(count, count > 1);
},